package phapp.service.data.impl;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import cn.org.rapid_framework.page.Page;
import cn.org.rapid_framework.page.PageRequest;
import javacommon.base.*;

import phapp.model.data.*;
import phapp.dao.data.*;
import phapp.service.data.impl.*;
import phapp.service.data.*;
/**
* Title: t_curve_data  业务处理层 
* Description: spring事务实现层,调用Dao层取数据
* Copyright: Copyright (c) 2012-10
* Company: 
* 
* @author you name 
* @version 1.0 
*/

@Component("curveManager")
@Transactional
public class CurveManagerImpl extends BaseManager<Curve,java.lang.Integer> 
					implements CurveManager {
	
	/**定义Dao*/					
	private CurveDao curveDao;
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性*/
	public void setCurveDao(CurveDao dao) {
		this.curveDao = dao;
	}
	
	/**获取Dao*/	
	public EntityDao getEntityDao() {
		return this.curveDao;
	}
	
	/**
	* <p>分页查询Curve<br>
	* @param PageRequest pr
	* @return Page
	* @author 
	*/
	@Transactional(readOnly=true)
	public Page findByPageRequest(PageRequest pr) {
		return curveDao.findByPageRequest(pr);
	}
	
	/**
	* <p>批量删除 Curve<br>
	* @param Curve u
	* @return Boolean
	* @author 
	*/	
	@Transactional(readOnly=true)
	public Boolean  removeByIdArry(Curve u) {
		Boolean result =false;
		int i =-1,size=u.getIdList().size();
		i =curveDao.removeByIdArry(u);
		if(i==size){
			result =true;
		}else{
			throw new RuntimeException();
		}
		return result;
	}
	
}
